<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>测试 / 柱状图</title>
    <script src="../dist/H5Charts.js"></script>
    <style>
        #root {
            width: 700px;
            height: 500px;
            background-color: #f8f8f8;
        }
    </style>
</head>

<body>
    <div id="root"></div>

    <script>

        var mychart = new H5Charts(document.getElementById("root"), {
            xAxis: {
                // type: 'category',
                data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
            },
            // yAxis: {
            //     type: 'value'
            // },
            series: [{
                type: "bar",
                data: [120, 200, 150, 80, 70, 110, 130]
            }
                , {
                type: "bar",
                data: [20, 100, 350, 80, 170, 10, 13]
            }
            ]
        });

        // console.log(mychart);

        setTimeout(function () {

            mychart.setOption({
                yAxis: {
                    type: 'category',
                    data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
                },
                xAxis: {
                    type: 'value'
                },
            });

        }, 1000);

    </script>

</body>

</html>